package robocup.component.infotypes;

import robocup.parser9.Token;

/**
 * ChangeOpponentTypeInfo is received, if the opponents team changed a
 * heterogeneous player-type assignment.
 */
public class ChangeOpponentTypeInfo
    extends Info {

  /**
   * The number of the player, who has a new player-type.
   */
  protected int playerNumber;

  /**
   * Constructs an info object, indicating that the opponents team changed a
   * player type of an agent
   * 
   * @param playerNumber -
   *          the agents unum
   */
  public ChangeOpponentTypeInfo(
      final Token playerNumber) {

    super(-1);
    this.playerNumber = Integer.parseInt(playerNumber.toString());
    this.infoType = Info.TYPE_OPLAYERTYPE;
  }

  /**
   * @return Returns the number of the exchanged player.
   */
  public int getPlayerNumber() {

    return this.playerNumber;
  }

}
